/**
 * Copyright (c) 2005 - 2007 FeyaSoft Corp. All Rights Reserved.
 */
package com.feyaSoft.home.web.source;

import org.json.JSONObject;

/** 
 * TODO Class or interface comments begin with a single descriptive sentence.
 * 
 * @author Fenqiang.Zhuang
 */
public class Fold
{
	protected String text;
	protected String id;
	protected String cls;


	/**
	 * Return the value of cls
	 * 
	 * @return String - cls.
	 */
	public String getCls()
	{
		return cls;
	}


	/**
	 * Set the value of cls
	 * 
	 * @param File.java - String.
	 */
	public void setCls(String cls)
	{
		this.cls = cls;
	}


	/**
	 * Return the value of id
	 * 
	 * @return String - id.
	 */
	public String getId()
	{
		return id;
	}


	/**
	 * Set the value of id
	 * 
	 * @param File.java - String.
	 */
	public void setId(String id)
	{
		this.id = id;
	}


	/**
	 * Return the value of text
	 * 
	 * @return String - text.
	 */
	public String getText()
	{
		return text;
	}


	/**
	 * Set the value of text
	 * 
	 * @param File.java - String.
	 */
	public void setText(String text)
	{
		this.text = text;
	}


	public JSONObject toJSONObject() throws Exception
	{
		JSONObject json = new JSONObject();
		json.put("text", this.text);
		json.put("id", this.id);
		json.put("cls", "folder");

		return json;
	}
}
